export default {
    data: {
        title: "HEllo",
        hidden: "/common/images/1.jpg",
        isPressed: false,
        isHidden: true,
        array: [
            {id: 1, image1: '/pages/index/media/1.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 2, image1: '/pages/index/media/2.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 3, image1: '/pages/index/media/3.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 4, image1: '/pages/index/media/4.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 5, image1: '/pages/index/media/5.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 6, image1: '/pages/index/media/6.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 7, image1: '/pages/index/media/7.jpg', image2: '/pages/index/media/Code.jpg'},
            {id: 8, image1: '/pages/index/media/8.jpg', image2: '/pages/index/media/Code.jpg'}
        ],
    },
    change: function(index) {
        for (var i = 0; i < this.array.length; i++) {
            if (index + 1 == this.array[i].id) {
                var image = this.array[i].image1
                this.array[i].image1 = this.array[i].image2
                this.array[i].image2 = image
            }
        }

    },
//    change(){
//        var temp;
//        if(!this.isPressed) {
//            this.hidden = "/common/images/Code.jpg"
//        } else {
//            this.hidden = "/common/images/1.jpg"
//        }
//        this.isPressed = !this.isPressed;
//    },
    longpressing(){
        this.isHidden = false;
    },
    onInit() {
//        this.title = this.$t('strings.world');
    },
}
